import { createApp } from 'vue'
import App from './App.vue'

//路由控制
import router from './router'  //引入vue-router

//引入vuex
import store from './store/index' //引入vuex

//引入elementUI
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { ElMessage } from 'element-plus'


// Markdown 编辑插件
import VueMarkdownEditor from '@kangc/v-md-editor'
import '@kangc/v-md-editor/lib/style/base-editor.css'
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js'
import '@kangc/v-md-editor/lib/theme/style/vuepress.css'

// markdown 显示插件
import VMdPreview from '@kangc/v-md-editor/lib/preview'
import '@kangc/v-md-editor/lib/style/preview.css'
// 引入你所使用的主题 此处以 github 主题为例
// import githubTheme from '@kangc/v-md-editor/lib/theme/github'
VMdPreview.use(vuepressTheme)
VueMarkdownEditor.use(vuepressTheme)


const app = createApp(App);
app.use(router); //使用router
app.use(store); //使用vuex
app.use(ElementPlus); //使用elementUI
app.use(VueMarkdownEditor) // markDown编辑器
app.use(VMdPreview) // markDown 显示
//挂载组件
app.config.globalProperties.$message = ElMessage;
app.mount('#app')



// createApp(App).mount('#app')
